
package com.idealighter.game.games.zjh.handler;

import com.idealighter.game.core.annotation.ResMsgHandler;
import com.idealighter.game.games.zjh.ZjhPlayer;
import com.idealighter.game.games.zjh.message.ResReadyMsg;
import com.idealighter.game.message.ModuleMsgIdConstant;
import com.idealighter.game.message.core.ResMessage;
import com.idealighter.game.robot.core.Player;
import com.idealighter.game.robot.handler.ResMessageHandler;

@ResMsgHandler(ModuleMsgIdConstant.Zjh.RES_READY)

public class ResReadyHandler implements ResMessageHandler {

  // private static final Logger LOG = LoggerFactory.getLogger(ResReadyHandler.class);

  @Override
  public void action(Player player, ResMessage message) {
    ResReadyMsg msg = (ResReadyMsg) message;
    if (msg.getPlayerId() == player.playerId) {
      ZjhPlayer zjhPlayer = (ZjhPlayer) player;
      zjhPlayer.reset();
    }
  }
}
